<%@ page contentType="text/html; charset=utf-8" language="java" import="java.util.*" pageEncoding="utf-8" errorPage="" %>
<%@ page import="club325.webchat.model.NoticeBean" %>
<%@ page import="club325.webchat.servlet.admin.AdminManager" %>
<%@ page session="false" %>

<%
	List<NoticeBean> noticeList = null;
	noticeList = AdminManager.getAllNotice();
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/frame.dwt.jsp" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<meta http-equiv="Keywords" content="WebChat,Chat" />
<meta http-equiv="Description" content="Chatting on Web" />

<!-- InstanceBeginEditable name="doctitle" -->
<title>公告板管理</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<link href="/WebChat/style/admin_announcement.css" rel="stylesheet" type="text/css" />
<!-- InstanceEndEditable -->

<link href="/WebChat/style/global.css" rel="stylesheet" type="text/css" />
<link href="/WebChat/style/frame.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="main">
<!-- InstanceBeginEditable name="EditRegion_main" -->
  <h1>公告板管理...</h1>
  <div class="body_box">
    <table width="570" border="0" cellspacing="0" cellpadding="0" class="message_box">
      <tr>
        <th width="102" scope="col">发布人</th>
        <th width="312" scope="col">标题</th>
        <th width="92" scope="col">日期</th>
        <th width="62" scope="col">操作</th>
      </tr>
      <%
    	if (noticeList == null || noticeList.isEmpty()) {
      %>
      <tr>
       	<td colspan="4">暂无信息</td>
      </tr>
      <%
    	} else {
    		for (NoticeBean notice : noticeList) {
      %>
      <tr>
        <td><%= notice.getOwnerID() %></td>
        <td><a href="/WebChat/servlet/ShowNoticeServlet?id=<%= notice.getId() %>"><%= notice.getShortTheme() %></a></td>
        <td><%= notice.getDate() %></td>
        <td><a href="/WebChat/servlet/DeleteNoticeServlet?id=<%= notice.getId() %>">删除</a></td>
      </tr>
      <%
    		}
    	}
      %>
    </table>
  </div>
  <h6><a href="/WebChat/pages/admin_announcement_write.jsp">发布公告</a></h6>
<!-- InstanceEndEditable -->
</div>
</body>
<!-- InstanceEnd --></html>
